// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
//导入ElementUI组件
import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)
/** 
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios)*/
import changeHeader from '../src/pages/common/changeHeader/changeHeader'
Vue.use(changeHeader)
import axios from 'axios'
import Qs from 'qs'
import VueAxios from 'vue-axios'
var axios_instance = axios.create({
  baseURL:'http://47.101.180.43:8075', //自行修改url,
  transformRequest: [function (data) {
  data = Qs.stringify(data);
  return data;
  }],
  headers:{'Content-Type':'application/x-www-form-urlencoded',
  'Access-Control-Allow-Credentials': 'true'}
  })
Vue.use(VueAxios, axios_instance)
/**axios不是vue插件，所以需要这样配置，可以通过this.$http代替axios，而不用每个.vue里面再去import */
Vue.prototype.$ajax=axios
/**运行跨域请求*/
axios.defaults.withCredentials=true
//引入地图
import VueAMap from 'vue-amap'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import './assets/iconfont/iconfont.css'

import Mui from 'vue-awesome-mui'

//import SlideVerify from 'vue-monoplasty-slide-verify'
import background from '../src/pages/background/background'
Vue.use(background)
import Vant from 'vant';
import 'vant/lib/index.css';
//引入吸顶效果的组件
import stickySlot from '../src/pages/common/stickySlot/stickySlot'
//引入头部
import MyHeader from './pages/common/MyHeader/MyHeader'
//引入变化的头部
// import changeHeader from './pages/common/changeHeader/changeHeader'
// import changeHeader from './pages/common/changeHeader/changeHeader'
//引入store
import store from './store'
// 导入App根组件
import App from './App'
import router from './router'
import IP from '../src/pages/IP/IP'
Vue.prototype.IP=IP
Vue.use(VueAMap);
Vue.use(stickySlot);
Vue.use(MyHeader);
// Vue.use(changeHeader);
Vue.use(ElementUI);
Vue.use(Vant);
Vue.use(Mui);
Vue.config.productionTip = false
//静态变量
Vue.prototype.yuming = "http://47.101.155.73:8080/test"
//Vue.prototype.token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NTUzMzkwNTAyNTIsInBheWxvYWQiOiJ7XCJwaG9uZVwiOlwiQVwiLFwicGFzc3dvcmRcIjpcIkJcIixcInVzZXJJRFwiOjF9In0.z39j4x-2RdroBAZce2WoBCFUwXkglorq2yBilWKWeXk"
/* eslint-disable no-new */
VueAMap.initAMapApiLoader({
  key: 'b309c21e07d89f391fccfa363c7299e3',
  /**插件集合,这里不仅要全局引入，使用时还要给单个地图配置插件*/
  /**
   * AMap.Scale:显示比例尺的插件
   * AMap.OverView:鹰眼插件
   * AMap.ToolBar：工具尺插件
   * AMap.MapType：地图类型切换插件，用来切换固定的几个常用图层 
   * AMap.Geolocation：精确定位插件 */
	plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType','AMap.Geolocation','MarkerClusterer','AMap.Geocoder'],
  /**默认高德 sdk 版本为 1.4.4*/
  v: '1.4.4',
  /**ui库版本，不配置不加载*/
  uiVersion: '1.0.11' // 版本号
})

const FastClick = require('@/../static/js/fastclick.js');
FastClick.attach(document.body);

new Vue({
  el: '#app',
  // render: c=>c(app)
  router,
  store,
  components: { App },
  template: '<App/>',
  render: h => h(App)
})
